/*文件注释
 * ===============================================================================
 * 说明：
 * 作者：zengyy
 * 版本：v1.0
 * 创建日期：2013-05-04 16:46:03
 * 完成日期： 
 * 修改纪录：  
 * ===============================================================================
 */
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace SRF.Admin.Models
{ 
    ///<summay>
    /// 部门
    ///</summay>
    [Serializable]
    public class Department
    {
        #region 属性

        /// <summary>
        /// 
        /// </summary> 
        [DisplayName("Id")]
        public string Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary> 
        [DisplayName("名称")]
        [Required(ErrorMessage = "请输入部门名称")]
        public string Name { get; set; }
        /// <summary>
        /// 
        /// </summary> 
        [DisplayName("排序")]
        public int Rank { get; set; }
        /// <summary>
        /// 上级部门
        /// </summary> 
        [DisplayName("上级部门")]
        public string ParentId { get; set; }
        /// <summary>
        /// 备注
        /// </summary> 
        [DisplayName("备注")]
        public string Remark { get; set; }

        /// <summary>
        /// 上级部门
        /// </summary> 
        [DisplayName("上级部门")]
        public string ParentDepartment { get; set; }

        #endregion

        public override bool Equals(object obj)
        {
            if (obj != null && ((Department)obj).Id == this.Id)
                return true;
            else
                return base.Equals(obj);
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}